<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>02求n、的阶乘</title>
	</head>
	<body>
		<script>
			let n = prompt('请输入n的值，求阶乘',1);
			let result = 1;
			for (let i = 1; i <= n; i++) {
				result *= i;
			}
			console.log(result);
		</script>
		
	</body>
</html>